how to use triangle law